WIP GitHub actions Website Deployment #34
Workflow file for this run
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: Test deployment | |
on: | |
pull_request: | |
push: | |
branches: | |
- master # Review gh actions docs if you want to further define triggers, paths, etc | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
permissions: | |
contents: write | |
jobs: | |
tests: | |
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main | |
secrets: inherit | |
with: | |
runner: linux.12xlarge | |
docker-image: cimg/python:3.6-node | |
repository: pytorch/captum | |
secrets-env: "GITHUB_TOKEN" | |
script: | | |
sudo chmod -R 777 . | |
./scripts/install_via_pip.sh -n -d | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "Captum website deployment script" | |
export GITHUB_TOKEN="${SECRET_GITHUB_TOKEN}" | |
echo $GITHUB_TOKEN | |
echo "machine github.com login github-actions password ${SECRET_GITHUB_TOKEN}" > ~/.netrc | |
./scripts/build_docs.sh -b | |
cd website | |
GIT_USER=github-actions USE_SSH=true yarn run publish-gh-pages |