-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Simple workflow for deploying static content to GitHub Pages | ||
| name: Deploy dev-branch content to Pages | ||
|
|
||
| on: | ||
| # Runs on pushes targeting the default branch | ||
| push: | ||
| branches: ["main"] | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| # Allow one concurrent deployment | ||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| deploy: | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url } | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [16.x] | ||
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
|
||
| runs-on: [ self-hosted ] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - uses: actions/setup-node@v3 | ||
| name: Use Node.js ${{ matrix.node-version }} | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - uses: pnpm/action-setup@v2 | ||
| name: Install pnpm | ||
| id: pnpm-install | ||
| with: | ||
| version: 7 | ||
| run_install: false | ||
|
|
||
| - name: Get pnpm store directory | ||
| id: pnpm-cache | ||
| shell: bash | ||
| run: | | ||
| echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
| - uses: actions/cache@v3 | ||
| name: Setup pnpm cache | ||
| with: | ||
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pnpm-store- | ||
| - name: Install dependencies | ||
| run: pnpm install | ||
|
|
||
| - name: Use pnpm to build | ||
| run: pnpm run build | ||
|
|
||
| # - name: post-build test | ||
| # run: pnpm test | ||
|
|
||
| - name: Setup Pages | ||
| uses: actions/configure-pages@v2 | ||
| - name: Upload artifact | ||
| uses: actions/upload-pages-artifact@v1 | ||
| with: | ||
| path: './dist' | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v1 |