Merge branch 'website' of https://github.com/Keyyard/create-mc-bedroc… #26
This file contains hidden or 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: Deploy static site from website branch | |
| on: | |
| push: | |
| branches: | |
| - website | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build static site | |
| run: npm run build | |
| - name: Copy static output to root | |
| run: | | |
| cp -r out/* . | |
| cp -r out/.* . || true | |
| - name: Clean up build artifacts | |
| run: rm -rf out .next | |
| - name: Commit and push static site | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add . | |
| git commit -m "Deploy static site [skip ci]" || echo "No changes to commit" | |
| git push |