Skip to content

Deploy Pages

Deploy Pages #110

Workflow file for this run

name: Deploy Pages
on:
push:
branches:
- main
repository_dispatch:
types:
- html-task-updated
workflow_dispatch:
schedule:
- cron: "23 */6 * * *"
permissions:
contents: read
pages: write
id-token: write
env:
PAGES_ARTIFACT_NAME: github-pages-${{ github.run_id }}-${{ github.run_attempt }}
concurrency:
group: psyflow-web-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: psyflow-web
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: psyflow-web/package-lock.json
- name: Install dependencies
working-directory: psyflow-web
run: npm ci
- name: Build Pages site
working-directory: psyflow-web
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: ${{ env.PAGES_ARTIFACT_NAME }}
path: psyflow-web/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: ${{ env.PAGES_ARTIFACT_NAME }}