diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..903aa86 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy Preview + +on: + push: + branches: + - "**" # triggers on any branch + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + + steps: + - uses: actions/checkout@v4 + + - name: Create branch folder + run: mkdir -p preview/$GITHUB_REF_NAME && cp index.html preview/$GITHUB_REF_NAME/ + + - uses: actions/upload-pages-artifact@v3 + with: + path: ./preview + + - uses: actions/deploy-pages@v4 \ No newline at end of file