Skip to content

Deploy static content #18

Deploy static content

Deploy static content #18

Workflow file for this run

name: Deploy static content
on:
push:
branches: ["main"]
schedule:
- cron: '0 0 * * 1' # Runs every monday at midnight UTC
workflow_dispatch: # Allows manual triggering
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm install
- name: Setup stats
env:
STEAM_ID: ${{ secrets.STEAM_ID }}
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }}
DISCORD_ID: ${{ secrets.DISCORD_ID }}
DISCORD_BOT_KEY: ${{ secrets.DISCORD_BOT_KEY }}
GIT_API_KEY: ${{ secrets.GIT_API_KEY }}
run: |
bash setup-stats.sh
- name: Build
run: npm run build
- name: Copy missing static files
run: cp dist/index.html dist/404.html
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: "./dist"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4