Refresh publications site #67
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: Refresh publications site | |
on: | |
push: | |
branches: | |
- 'main' | |
schedule: | |
- cron: '51 3 * * *' | |
env: | |
ADS_LIBRARY_ID: EctrgCz4QjagJOiSxQlAXg | |
ADS_API_TOKEN: ${{ secrets.ADS_API_TOKEN }} | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get install -y python3 python3-pip | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- run: | | |
cd ${{ github.workspace }} | |
make | |
- name: Add SSH key | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p /home/runner/.ssh | |
echo "xwcl.science ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqGanUWS9Wb34oCHCDX2xqhlCstMTN9c0oFoKJkYtZ3" >> /home/runner/.ssh/known_hosts | |
echo "${{ secrets.DEPLOY_GARY }}" > /home/runner/.ssh/github_actions | |
chmod 600 /home/runner/.ssh/github_actions | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add /home/runner/.ssh/github_actions | |
- name: Sync to magao-x.org | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
rsync -rz --delete output/ [email protected]:/srv/www/main/publications/ |