Deploy #1
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 | |
env: | |
REPO: time-rs/time-rs.github.io | |
WORKFLOW: build-website.yaml | |
GH_TOKEN: ${{ secrets.WEBSITE_PUBLISHING }} | |
on: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- name: Trigger deploy | |
id: trigger | |
run: | | |
gh workflow run --repo ${{ env.REPO }} ${{ env.WORKFLOW }} | |
sleep 3 # Let the run be created | |
echo "RUN_ID=$(gh run list --repo ${{ env.REPO }} --json databaseId --workflow ${{ env.WORKFLOW }} --limit 1 | jq -r '.[0].databaseId')" >> "$GITHUB_OUTPUT" | |
- name: Wait for deployment | |
run: gh run watch --repo ${{ env.REPO }} ${{ steps.trigger.outputs.RUN_ID }} --interval 1 --exit-status |