Skip to content

Commit

Permalink
Improve resume generate (#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
eerison authored Mar 24, 2023
1 parent ba0571f commit aa4bfcd
Show file tree
Hide file tree
Showing 3 changed files with 1,579 additions and 45 deletions.
50 changes: 7 additions & 43 deletions .github/workflows/resume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,12 @@ on:
types: [labeled]

jobs:
execute:
name: Initial checks
if: github.event_name == 'discussion' || github.event.label.name == 'template'
runs-on: ubuntu-latest
steps:
- run: echo "make github happy :)"

build:
name: Build
runs-on: ubuntu-latest
needs: execute
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19

- name: cache
id: cache-frontend
uses: actions/cache@v3
with:
key: frontend-${{ hashFiles('**/package-lock.json') }}
path: |
node_modules
.cache
restore-keys: |
frontend-
- run: npm install

pdf:
resume:
runs-on: ubuntu-latest
needs: build
name: Generate pdf
if: github.event_name == 'discussion' || github.event.label.name == 'template'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19

- uses: actions/cache@v3
with:
key: frontend-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -56,6 +22,8 @@ jobs:
restore-keys: |
frontend-
- run: npm install

# Process from discussion.
- name: Get content from discussion's description
if: github.event_name == 'discussion'
Expand Down Expand Up @@ -84,11 +52,7 @@ jobs:
kill "${pid}"
- name: Upload resume to bucket
run: |
python -m pip install --upgrade pip
pip install awscli
aws s3 cp ./data/pdf s3://users/${{github.actor}} --endpoint-url ${{env.ENDPOINT_URL}} --recursive
run: npm run cloud:bucket:object put -- --file=data/pdf/resume.pdf myprofile/users/${{github.actor}}/resume.pdf
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
ENDPOINT_URL: https://${{secrets.CLOUDFLARE_ACCOUNT_ID}}.r2.cloudflarestorage.com/myprofile
CLOUDFLARE_ACCOUNT_ID: ${{secrets.CLOUDFLARE_ACCOUNT_ID}}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Loading

0 comments on commit aa4bfcd

Please sign in to comment.