-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.5 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish Blog
on:
push:
branches:
- master
jobs:
Build-Publish:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install Dependencies
run: poetry install --no-interaction
- run: make html
- name: Set up S3cmd cli tool
uses: s3-actions/[email protected]
with:
provider: aws # default is linode
region: 'eu-central-1'
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
- name: Copy to S3
run: |
s3cmd rm --recursive --force s3://blog.kenpayne.co.uk/
s3cmd put --recursive site/ s3://blog.kenpayne.co.uk/ --acl-public --guess-mime-type --no-mime-magic --add-header='Cache-Control:max-age=0'
s3cmd sync s3://static.kenpayne.co.uk/ s3://blog.kenpayne.co.uk/_static/ --acl-public --guess-mime-type --no-mime-magic --add-header='Cache-Control:max-age=0'
- run: echo "Done 🚀"