ci: fix the deploy artifact path for tools app #32
This file contains hidden or 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: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build apps | |
run: pnpm build | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Prepare deployment artifact | |
run: | | |
mkdir -p _site/tools _site/files | |
cp -r apps/tools/out/* _site/ | |
cp -r apps/files/out/* _site/files/ | |
# Add a .nojekyll file to the root of the site to prevent Jekyll from running | |
touch _site/.nojekyll | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v4 | |
with: | |
path: _site | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |