Skip to content

Instantly share code, notes, and snippets.

@filipgorczynski
Created January 12, 2022 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save filipgorczynski/ea68fa7f919da8b8c00a111d8ce17e11 to your computer and use it in GitHub Desktop.
Save filipgorczynski/ea68fa7f919da8b8c00a111d8ce17e11 to your computer and use it in GitHub Desktop.
.github workflow to deploy changes
on: push
name: ๐Ÿš€ Deploy blog posts on push
jobs:
web-deploy:
name: ๐ŸŽ‰ Deploy
runs-on: ubuntu-latest
steps:
- name: ๐Ÿฆ„ Code checkout
uses: actions/checkout@v2.4.0
- name: ๐Ÿ Install Python 3.8
uses: actions/setup-python@v2.3.1
with:
python-version: 3.8
- name: โ™ป๏ธ Create Python virtualenv
uses: syphar/restore-virtualenv@v1.2
- name: ๐Ÿ“ฆ Install Python dependencies
run: pip install -r requirements.txt
- name: ๐Ÿ‘ท Build output
run: |
make html && make publish
rm -rf .vscode
rm -rf __pycache__
rm -rf drafts
rm -rf scratchpads
rm -rf archive
- name: ๐Ÿ“‚ FTP Deploy
uses: SamKirkland/FTP-Deploy-Action@4.2.0
with:
server: ${{ secrets.ftp_host }}
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
local-dir: ${{ secrets.localdir }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment