fix thing #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: Autobuild | |
on: | |
push: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
build: | |
permissions: | |
deployments: write | |
contents: read | |
pages: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.x | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Compile frontend | |
run: pnpm run build | |
env: | |
CI: "false" | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "./dist" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Archive artifact | |
shell: sh | |
run: | | |
tar \ | |
--dereference --hard-dereference \ | |
--directory "$INPUT_PATH" \ | |
-cvf "$RUNNER_TEMP/artifact.tar" \ | |
--exclude=.git \ | |
--exclude=.github \ | |
. | |
env: | |
INPUT_PATH: dist/ | |
- name: Upload artifact | |
id: upload-artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: ${{ runner.temp }}/artifact.tar | |
retention-days: 1 | |
if-no-files-found: error | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: Profile | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |