diff --git a/.github/workflows/pages.yaml b/.github/workflows/pages.yaml new file mode 100644 index 0000000..42618cc --- /dev/null +++ b/.github/workflows/pages.yaml @@ -0,0 +1,32 @@ +name: GitHub Pages +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v4 + - name: Install dependencies + run: pnpm i + - name: Build application + run: pnpm build + - name: Remove all files except dist directory + run: find . -maxdepth 1 ! -name 'dist' ! -name '.git' ! -name '.' -exec rm -rf {} + + - name: Move dist to docs + run: mv dist docs + - uses: actions/checkout@v3 + with: + ref: 'gh-pages' + clean: false + - name: Push to gh-pages + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add . + git commit -m "Release project" + git push \ No newline at end of file