Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
Updating main.yml so it can be deployed in the future, eg. when fixing issue #10.
  • Loading branch information
pefribeiro authored Jun 15, 2022
1 parent b224bff commit e7f481b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,27 @@ jobs:
- name: Build with Maven
run: mvn clean install

- name: Setup SSH
- if: (github.ref == 'refs/heads/master') && github.event_name == 'push'
name: Setup SSH
uses: kielabokkie/ssh-key-and-known-hosts-action@v1
with:
# Private key required to access the host
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# Hostname or IP to add to the known hosts file
ssh-host: ${{ secrets.ROBOSTAR_WEB_HOST }}

- name: Making upload.sh executable
- if: (github.ref == 'refs/heads/master') && github.event_name == 'push'
name: Making upload.sh executable
run: chmod +x upload.sh

# If branch is 'master' and not a pull request, then upload.
#- if: (github.ref == 'refs/heads/master') && github.event_name != 'pull_request'
# name: Uploading update site
# run: ./upload.sh
# env:
# ROBOSTAR_WEB_ROOT: ${{ secrets.ROBOSTAR_WEB_ROOT }}
# ROBOSTAR_WEB_USER: ${{ secrets.ROBOSTAR_WEB_USER }}
# ROBOSTAR_WEB_HOST: ${{ secrets.ROBOSTAR_WEB_HOST }}
- if: (github.ref == 'refs/heads/master') && github.event_name == 'push'
name: Uploading update site
run: ./upload.sh
env:
ROBOSTAR_WEB_ROOT: ${{ secrets.ROBOSTAR_WEB_ROOT }}
ROBOSTAR_WEB_USER: ${{ secrets.ROBOSTAR_WEB_USER }}
ROBOSTAR_WEB_HOST: ${{ secrets.ROBOSTAR_WEB_HOST }}

# For commits to master other than pull requests, send RoboTool email updates.
#- if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
Expand All @@ -62,7 +64,8 @@ jobs:
# MAILCHIMPKEY: ${{ secrets.MAILCHIMPKEY }}
# MAILCHIMPUSR: ${{ secrets.MAILCHIMPUSR }}

- name: Recompile Textual Editor
- if: (github.ref == 'refs/heads/master') && github.event_name == 'push'
name: Recompile Textual Editor
run: |
# Propagate recompilation if global flag is active
if [[ -z ${ROBOSTAR_RECOMPILE_ALL} || ${ROBOSTAR_RECOMPILE_ALL} = false ]]; then
Expand Down

0 comments on commit e7f481b

Please sign in to comment.