Post about gh actions and services #360
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: publish-on-master | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.74.3' | |
extended: true | |
- name: Build | |
working-directory: ./codewrecks | |
run: hugo --minify | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
deploy_key: ${{ secrets.DEPLOYKEY }} | |
publish_dir: ./codewrecks/public | |
external_repository: alkampfergit/alkampfergit.github.io | |
publish_branch: master | |
keep_files: true | |
# - name: Install lftp | |
# run: sudo apt-get install lftp -y | |
# - name: Upload ftp | |
# run: lftp -e "set ftp:ssl-allow no; mirror --parallel=100 -R codewrecks/public /codewrecks.com/wwwroot" -u ${{ secrets.FtpUserName }},${{ secrets.ftpPassword }} ${{ secrets.FtpHostName }} | |
# - name: Upload ftp | |
# uses: sebastianpopp/ftp-action@releases/v2 | |
# with: | |
# host: ${{ secrets.FtpHostName }} | |
# user: ${{ secrets.FtpUserName }} | |
# password: ${{ secrets.ftpPassword }} | |
# localDir: "codewrecks/public" | |
# remoteDir: "codewrecks.com/wwwroot" | |
# - name: 'Ping search engines' | |
# uses: atymic/sitemap-ping-action@master | |
# with: | |
# sitemapUrl: 'http://www.codewrecks.com/sitemap.xml' |