feat: migrate to svelte #3
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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
run_install: true | |
- name: Build project | |
run: | | |
pnpm build | |
- name: Ensure correct permission | |
run: | | |
chmod -v -R +rX "build" | while read line; do | |
echo "::notice title=Ensuring correct permission::$line" | |
done | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: build | |
deploy: | |
needs: build | |
# Set up proper permission for deploying to GitHub Pages | |
permissions: | |
pages: write | |
id-token: write | |
# Set up correct environment for deploying to GitHub Pages | |
environment: | |
name: github-pages | |
url: ${{ steps.deploy.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deploy | |
uses: actions/deploy-pages@v2 |