Skip to content

Commit

Permalink
Feat/cicd (#83)
Browse files Browse the repository at this point in the history
* Revert "chore: update yml"

This reverts commit 4870297.

* feat: update puppeteer

* feat: add conditional removal of public/cv.pdf to puppeteer workflow
  • Loading branch information
hidaviddong authored Jul 9, 2024
1 parent 4c5a5d9 commit 7f7595c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/puppeteer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,19 @@ jobs:
run: PUPPETEER_PRODUCT=chrome deno run -A https://deno.land/x/puppeteer@16.2.0/install.ts

- name: Remove old cv.pdf
run: rm -f public/cv.pdf
run: if [ -f public/cv.pdf ]; then rm -f public/cv.pdf; fi

- name: Run Puppeteer script
run: deno run -A scripts/puppeteer.js

- name: Commit
uses: EndBug/add-and-commit@v5
with:
message: "update: new cv.pdf file"
add: "public/cv.pdf"

- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git fetch origin master
git reset --soft FETCH_HEAD
git add public/cv.pdf
git commit -m "chore: update cv.pdf"
git push origin master

0 comments on commit 7f7595c

Please sign in to comment.