Merge websites #837
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
on: | |
push: | |
branches: | |
- blogdown | |
workflow_dispatch: | |
workflow_run: | |
workflows: ["pkgdown"] | |
branches: ["master", "main"] | |
types: | |
- completed | |
name: Merge websites | |
jobs: | |
pkgdown: | |
runs-on: macOS-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
TORCH_TEST: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: 'blogdown' | |
- name: Deploy package | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
mkdir static/docs | |
cd static/docs | |
git clone -b gh-pages https://github.com/mlverse/torch.git . | |
rm -r .git/ | |
cd ../.. | |
git add -A | |
git commit --allow-empty -m "Update site" | |
git push --force origin HEAD:website |