Skip to content

Commit

Permalink
fix: add new secrets to GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGabreuw committed Dec 30, 2023
1 parent 73a02af commit 8f83c6d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 37 deletions.
44 changes: 8 additions & 36 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Quartz site to GitHub Pages
name: Deploy site to GitHub Pages

on:
push:
Expand All @@ -17,46 +17,18 @@ concurrency:
cancel-in-progress: false

jobs:
sync:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update submodules
run: |
previous_status=$(git status)
git submodule update --remote --merge
git submodule foreach git pull origin master --recurse-submodules
current_status=$(git status)
if [ "$previous_status" != "$current_status" ]; then
echo "has_changed=true" >> $GITHUB_ENV
else
echo "has_changed=false" >> $GITHUB_ENV
fi
- name: Commit changes
if: ${{ env.has_changed == 'true'}}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "Sync notes [skip actions]" --author "GitHub Action <[email protected]>"
- name: Push changes
if: ${{ env.has_changed == 'true'}}
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

build:
needs: sync
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
fetch-depth: 0
submodules: 'recursive'
token: ${{ secrets.MY_ZETTELKASTEN_ASSETS }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- shell: bash
env:
MY_ZETTELKASTEN_URL: ${{ secrets.MY_ZETTELKASTEN_URL }}
run: |
git clone "$MY_ZETTELKASTEN_URL" content
- uses: actions/setup-node@v3
with:
node-version: 18.14
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Notes

<p align="center">
<img src="banner.png" width="100%">
<img src="assets/banner.png" width="100%">
</p>

Bem-vindo ao repositório "Notes"! Este projeto é uma compilação organizada das minhas anotações elaboradas com base em artigos, vídeos, cursos que consumi durante minha caminhada no vasto universo da programação. Aqui, você encontrará insights, dicas, e informações detalhadas sobre uma variedade de tópicos relacionados ao desenvolvimento de software, abrangendo desde linguagens de programação específicas até conceitos fundamentais da ciência da computação e práticas de desenvolvimento.
Expand Down
File renamed without changes

0 comments on commit 8f83c6d

Please sign in to comment.