Skip to content

Commit

Permalink
Add deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Mar 13, 2024
1 parent 3cd909d commit f67f67d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- run: mkdir _site
- run: ./script/install.py --target _site
- name: Upload GitHub Pages Artifact
uses: actions/upload-pages-artifact@v1

deploy_pages:
needs: build
if: github.ref_name == 'main'

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit f67f67d

Please sign in to comment.