Update Docs #148
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: Update Docs | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build documents | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/muncomputersciencesociety/executive-docs-base-img:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Compile documents | |
run: | | |
mkdir -p ./executive-documents/ | |
python3 cli.py builddocs --base /~csclub/executive-documents/ --input . --output ./executive-documents/ | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Docs | |
path: executive-documents | |
push: | |
name: Push documents | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: Docs | |
- name: Copy documents to server | |
uses: appleboy/[email protected] | |
with: | |
host: "garfield.cs.mun.ca" | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
source: "Docs/" | |
target: ".www/executive-documents" | |
strip_components: 1 | |
overwrite: true | |
- name: Set document permissions | |
uses: appleboy/[email protected] | |
with: | |
host: "garfield.cs.mun.ca" | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
script: | | |
chmod -R 0755 .www/executive-documents |