-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.32 KB
/
main.yml
File metadata and controls
51 lines (44 loc) · 1.32 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI/CD
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Git checkout
uses: actions/checkout@v2.3.3
- name: Update theme
run: git submodule update --init --recursive
- name: Setup hugo
uses: peaceiris/actions-hugo@v2.4.13
with:
hugo-version: '0.76.5'
- name: Build
run: hugo --minify
- name: Deploy to Github Actions
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.CV_TOKEN }}
external_repository: bezha/cv
publish_dir: ./public
user_name: bezha
user_email: bezha@gmail.com
publish_branch: main
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
SOURCE_DIR: 'public'
AWS_S3_BUCKET: cv.bezha.od.ua
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy to FTP
uses: SamKirkland/FTP-Deploy-Action@4.2.0
with:
server: cv.bezha.od.ua
local-dir: ./public/
username: ${{ secrets.ftp_login }}
password: ${{ secrets.ftp_password }}