diff --git a/.github/workflows/publish-pages.yml b/.github/workflows/publish-pages.yml new file mode 100644 index 0000000..a0b64c5 --- /dev/null +++ b/.github/workflows/publish-pages.yml @@ -0,0 +1,43 @@ +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 12.x + + - run: npm install + + - run: npm run build + + - name: Fix permissions + run: | + chmod -c -R +rX "_site/" | while read line; do + echo "::warning title=Invalid file permissions automatically fixed::$line" + done + + - uses: actions/upload-pages-artifact@v2 + + deploy: + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - id: deployment + uses: actions/deploy-pages@v2 diff --git a/examples/demo.html b/pages/demo.html similarity index 89% rename from examples/demo.html rename to pages/demo.html index 569eeaa..cc5377f 100644 --- a/examples/demo.html +++ b/pages/demo.html @@ -17,8 +17,7 @@ Press o k click this link