Update preview branch #3
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: Update preview branch | |
on: workflow_dispatch | |
jobs: | |
deploy-preview: | |
name: Update preview branch | |
runs-on: ubuntu-latest | |
environment: deploy | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Pull documents from Notion | |
run: ./pull_docs.sh --skip-pulling-from-s3 | |
env: | |
SF_HELP_NOTION_TOKEN: ${{ secrets.SF_HELP_NOTION_TOKEN }} | |
SF_HELP_NOTION_ROOT_PAGE_ID: ${{ secrets.SF_HELP_NOTION_ROOT_PAGE_ID }} | |
- name: Commit and push changes to preview branch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Update files from Notion" | |
git push -f origin HEAD:preview |