-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (79 loc) · 2.29 KB
/
release.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: GitHub Pages
on:
push:
branches:
- master # Set a branch name to trigger deployment
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.85.0'
- name: Build
run: hugo --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# name: build hugo
# on:
# push:
# branches:
# - master
# pull_request:
# jobs:
# deploy:
# runs-on: ubuntu-18.04
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# fetch-depth: 0
# - name: Setup Hugo
# uses: peaceiris/actions-hugo@v2
# with:
# hugo-version: '0.85.0'
# - name: Build
# run: hugo --minify
# - name: Render
# uses: actions/upload-artifact@v2
# with:
# name: rendered-html
# path: ./public
# - name: Deploy
# uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/master'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
# - name: Checkout GitHub Pages Branch
# uses: actions/checkout@v2
# with:
# repository: "moeb98/moeb98.github.io"
# fetch-depth: 0
# ref: "master"
# path: "./gh-pages"
# - name: Copy to GitHub Pages
# run: |
# rm -rf ./gh-pages/*
# cp -Rv ./public/* gh-pages/
# - name: Commit
# working-directory: ./gh-pages
# run: |
# git config --local user.email "moeb98@yahoo.de"
# git config --local user.name "moeb98"
# git add -A
# git commit -m "Update docs"
# REMOTE="https://${{github.repository_owner}}:${{secrets.GITHUB_TOKEN}}@github.com/moeb98/moeb98.github.io.git"
# git push