Skip to content

🌏 Deploy Website #650

🌏 Deploy Website

🌏 Deploy Website #650

name: '🌏 Deploy Website'
on:
schedule:
# Website is deployed once daily since we generate cards for tweets and
# GitHub repositories at build time and we want to keep them up-to-date.
- cron: 0 0 * * * # end of every day
push:
# Also deploy website when main is updated.
branches:
- main
jobs:
deploy:
name: '🌏 Deploy Website'
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
- name: ⚙️ Setup Node
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
cache-dependency-path: '**/package-lock.json'
- name: 📦 Install Dependencies
run: npm install
- name: 🔐 Export Secrets
run: |
touch .env
echo "TWITTER_BEARER_TOKEN=${{ secrets.TWITTER_BEARER_TOKEN }}" >> .env
echo "GITHUB_PAT=${{ secrets.GH_BASIC }}" >> .env
- name: 👷 Build website
run: npm run build
- name: 📥 Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
cname: chickensoft.games
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build