chore: update readme #11
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 to Juno | |
on: | |
push: | |
branches: [main] | |
jobs: | |
check_run_conditions: | |
runs-on: ubuntu-latest | |
outputs: | |
should_run: ${{ steps.check_template.outputs.should_run }} | |
steps: | |
- name: Check if repo is template | |
id: check_template | |
run: | | |
IS_TEMPLATE=$(curl -s -H "Authorization: token ${{ github.token }}" \ | |
"https://api.github.com/repos/${{ github.repository }}" | \ | |
jq -r .is_template) | |
if [ "$IS_TEMPLATE" = "true" ]; then | |
echo "should_run=false" >> $GITHUB_OUTPUT | |
else | |
echo "should_run=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Print should_run | |
run: | | |
echo "should_run: ${{ steps.check_template.outputs.should_run }}" | |
build: | |
needs: check_run_conditions | |
if: needs.check_run_conditions.outputs.should_run == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: ./.github/actions/setup-node | |
- name: Build | |
run: pnpm build | |
- name: Deploy to Juno | |
uses: junobuild/juno-action@main | |
with: | |
args: deploy | |
env: | |
JUNO_TOKEN: ${{ secrets.JUNO_TOKEN }} | |
SANITY_STUDIO_PROJECT_ID: ${{ vars.SANITY_STUDIO_PROJECT_ID }} | |
SANITY_STUDIO_DATASET: ${{ vars.SANITY_STUDIO_DATASET }} |