Quick fix to make the previous commit work more consistently (aniwave… #178
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: build-and-deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Bun | |
uses: oven-sh/setup-bun@v1 | |
# - run: corepack enable | |
# - run: corepack prepare bun@latest --activate | |
- name: Install packages | |
run: bun install --no-frozen-lockfile | |
- name: Build DanielBady's JS | |
run: (cd node_modules/@mochiapp/js && bun run build) | |
- name: Build Repository | |
run: bun bundle | |
- name: Fix permissions | |
run: | | |
chmod -c -R +rX "dist/" | while read line; do | |
echo "::warning title=Invalid file permissions automatically fixed::$line" | |
done | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "./dist" | |
deploy: | |
needs: build | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |