Skip to content

Commit

Permalink
Add deployment workflow (#2)
Browse files Browse the repository at this point in the history
* Add deployment workflow

* Revert a step to run build

* Set env explicitly

* Set target paths
  • Loading branch information
IzumiSy authored Sep 5, 2024
1 parent 388f0a8 commit d8d4f68
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 30 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to GitHub Pages

on:
push:
branches: ["main"]
paths:
- public/**
- src/**
- .github/workflows/deployment.yml
- pnpm-lock.yaml
- index.html
- vite.config.ts

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

env:
VITE_GRAPHQL_ENDPOINT_URL: ${{ vars.VITE_GRAPHQL_ENDPOINT_URL }}

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v5
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm build
- uses: actions/upload-pages-artifact@v3
with:
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
39 changes: 9 additions & 30 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d8d4f68

Please sign in to comment.