update readme to check push main branch #152
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: local deploy test | |
on: | |
pull_request: | |
branches: [main] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
test_pull_request: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.GIT_SSH_KEY }} | |
name: id_rsa # optional | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
config: ${{ secrets.SSH_CONFIG }} # ssh_config; optional | |
if_key_exists: replace # replace / ignore / fail; optional (defaults to fail) | |
- run: | | |
set -e | |
set -x | |
export GIT_MAIL=${{ secrets.GIT_MAIL }} | |
export GIT_NAME=${{ secrets.GIT_NAME }} | |
export TERM=xterm | |
export WANDB_API_KEY=${{ secrets.WANDB_API_KEY }} | |
git config --global user.email "$GIT_MAIL" | |
git config --global user.name "$GIT_NAME" | |
git clone git@github.com:ministry-of-silly-code/examples.git examples_local | |
python3 -m venv venv | |
source venv/bin/activate | |
cd examples_local | |
pip install -r requirements.txt | |
echo "GA-run-local" | python mnist_classifier.py |