| name: Deploy GitHub Pages |
|
|
| on: |
| |
| push: |
| tags: |
| - "v*" |
|
|
| |
| workflow_dispatch: |
|
|
| |
| permissions: |
| contents: write |
| pages: write |
| id-token: write |
|
|
| |
| concurrency: |
| group: "pages" |
| cancel-in-progress: true |
|
|
| jobs: |
| |
| build: |
| runs-on: ubuntu-latest |
| strategy: |
| matrix: |
| node-version: [16.x] |
| |
|
|
| steps: |
| - uses: actions/checkout@v3 |
| - uses: pnpm/action-setup@v2.2.4 |
| with: |
| version: 7 |
| - name: Use Node.js ${{ matrix.node-version }} |
| uses: actions/setup-node@v3 |
| with: |
| node-version: ${{ matrix.node-version }} |
| cache: "pnpm" |
| - run: pnpm install |
| - run: pnpm build |
| - name: Setup Pages |
| uses: actions/configure-pages@v2 |
| - name: Upload artifact |
| uses: actions/upload-pages-artifact@v1 |
| with: |
| |
| path: './dist' |
| - run: pnpm build-singlefile |
| - run: pnpm generate_downloads |
| - name: Release |
| uses: softprops/action-gh-release@v1 |
| if: startsWith(github.ref, 'refs/tags/') |
| with: |
| files: | |
| html.zip |
| downloads.zip |
| |
| |
| 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@v1 |