Thanks to https://github.com/iarna/wide-align/issues/63#issuecomment-… #162
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: Deploy | |
on: | |
pull_request: | |
branches: [source] | |
push: | |
branches: [source] | |
jobs: | |
build-deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout sources | |
- uses: actions/setup-node@v4 | |
name: Setup Node.js | |
with: | |
node-version: "22" | |
cache: "yarn" | |
- run: yarn install --frozen-lockfile | |
name: Install dependencies | |
- run: yarn generate | |
name: Generate static site | |
- uses: actions/upload-artifact@v3 | |
name: Upload artifact | |
with: | |
name: dist | |
path: dist | |
- uses: peaceiris/actions-gh-pages@v3 | |
name: Deploy to branch | |
if: github.event_name != 'pull_request' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: master | |
publish_dir: ./dist | |
cname: ricardoboss.de |