Merge pull request #65 from CollegiumAcademicum/offener_treffpunkt #5
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: Build master branch and push to production | |
on: | |
push: | |
branches: ["master"] | |
workflow_dispatch: | |
concurrency: | |
group: "ftp" | |
cancel-in-progress: false | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
# Build job | |
# path for newer debs: | |
# wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | |
build: | |
runs-on: ubuntu-latest | |
env: | |
HUGO_VERSION: 0.96.0 | |
steps: | |
- name: Install Hugo CLI | |
run: | | |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.96.0/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \ | |
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
- name: Install lftp | |
run: sudo apt install lftp | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Node.js dependencies | |
run: "npm ci" | |
- name: Build with Hugo and Juice | |
run: bash build_prod.sh | |
- name: Upload to FTP | |
run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -R upload/ /web/website ; quit" |