Only show active subjects on statistics page. #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Timy to GitHub Pages | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "master" branch | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Set permissions for articat upload onto GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
# Enforce branch/deployment protection rules | |
environment: | |
name: github-pages | |
url: ${{steps.deployment.outputs.page_url}} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Setup Node.js and npm | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
# Configure GitHub Pages | |
- name: Configure GitHub Pages | |
id: config | |
uses: actions/configure-pages@v3.0.6 | |
# Build the artifacts for GitHub Pages | |
- name: Config environment | |
run: echo "VITE_GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID" >> .env.local | |
env: | |
GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }} | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: | | |
npm run build -- --base="$BASE_PATH" | |
cp dist/index.html dist/404.html | |
env: | |
BASE_PATH: ${{ steps.config.outputs.base_path }} | |
# Upload build files to GitHub Pages | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v2.0.0 | |
with: | |
path: dist/ | |
- name: Deploy GitHub Pages site | |
id: deployment | |
uses: actions/deploy-pages@v1.2.9 |