diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..f2a0079 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,36 @@ +name: publish + +on: [push] + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: install pug-cli & build + uses: actions/setup-node@v4 + with: + node-version: '20.x' + - run: npm install pug-cli -g + - run: pug --pretty -o dist --basedir src -- src/index.pug + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./dist + + 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