This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Refactors website to use zine-ssg.io #32
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: Render PR Preview | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Setup Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: master | |
- name: Render website | |
run: | | |
zig build | |
- name: Deploy | |
uses: easingthemes/ssh-deploy@main | |
with: | |
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} | |
ARGS: "-vzrli" | |
SOURCE: "zig-out/" | |
REMOTE_HOST: ${{ secrets.DEPLOY_HOST }} | |
REMOTE_USER: ${{ secrets.DEPLOY_USER }} | |
REMOTE_PORT: ${{ secrets.DEPLOY_PORT }} | |
TARGET: "./staging/pulls/${{ github.event.number }}" | |
- uses: mshick/add-pr-comment@v1 | |
with: | |
message: | | |
Heya! | |
You can check out a preview of your PR at [staging.microzig.tech/pulls/${{ github.event.number }}](https://staging.microzig.tech/pulls/${{ github.event.number }}/)! | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
repo-token-user-login: 'github-actions[bot]' # The user.login for temporary GitHub tokens | |
allow-repeats: false # This is the default |