-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,918 additions
and
1,900 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
name: Hugo CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
push: | ||
branches: | ||
- "master" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
run: | ||
working-directory: ./ | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 6 | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
|
||
- name: Build | ||
run: hugo --minify | ||
|
||
- name: Upload deployment | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: public-html | ||
path: ./public | ||
|
||
deploy: | ||
timeout-minutes: 6 | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: production | ||
url: https://maik.dev/ | ||
steps: | ||
- name: Download deployment | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: public-html | ||
path: ./public-html | ||
|
||
- name: Setup SSH config for remote server | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | ||
echo "${{ secrets.SSH_HOST }} ssh-ed25519 ${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts | ||
chmod 600 ~/.ssh/id_ed25519 | ||
eval "$(ssh-agent -s)" | ||
ssh-add ~/.ssh/id_ed25519 | ||
- name: Transfer deployment to remote server | ||
run: | | ||
rsync -avh --delete-after ./public-html/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/maik.dev | ||
build: | ||
timeout-minutes: 6 | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
|
||
- name: Build | ||
run: hugo --minify | ||
|
||
- name: Upload deployment | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: public-html | ||
path: ./public | ||
|
||
deploy: | ||
timeout-minutes: 6 | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
needs: build | ||
environment: | ||
name: production | ||
url: https://maik.dev/ | ||
steps: | ||
- name: Download deployment | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: public-html | ||
path: ./public-html | ||
|
||
- name: Setup SSH config for remote server | ||
run: | | ||
mkdir -p ~/.ssh | ||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | ||
echo "${{ secrets.SSH_HOST }} ssh-ed25519 ${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts | ||
chmod 600 ~/.ssh/id_ed25519 | ||
eval "$(ssh-agent -s)" | ||
ssh-add ~/.ssh/id_ed25519 | ||
- name: Transfer deployment to remote server | ||
run: | | ||
rsync -avh --delete-after ./public-html/ ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:~/maik.dev |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
name: Hugo CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
- "*/*" | ||
- "**" | ||
- "!master" | ||
pull_request: | ||
branches: | ||
- "master" | ||
push: | ||
branches: | ||
- "*" | ||
- "*/*" | ||
- "**" | ||
- "!master" | ||
pull_request: | ||
branches: | ||
- "master" | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
run: | ||
working-directory: ./ | ||
|
||
jobs: | ||
ci: | ||
timeout-minutes: 5 | ||
name: CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
ci: | ||
timeout-minutes: 5 | ||
name: CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
- name: Setup hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: "latest" | ||
extended: true | ||
|
||
- name: Build | ||
run: hugo -D -F | ||
- name: Build | ||
run: hugo -D -F |
Oops, something went wrong.