Skip to content

Commit

Permalink
build(gha): improve workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Feb 24, 2023
1 parent 338b866 commit c282eaa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: 'Download translations and build the site'
runs:
using: composite
steps:
- uses: myparcelnl/actions/yarn2-install@v3
- uses: myparcelnl/actions/yarn-install@v3

- name: 'Import latest translations'
shell: bash
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,26 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- uses: ./.github/actions/build

- uses: actions/upload-pages-artifact@v1
with:
path: src/.vuepress/dist

- uses: actions/upload-artifact@v2
with:
name: dist
path: src/.vuepress/dist

deploy-s3:
needs: upload
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v2
with:
name: dist

- uses: reggionick/s3-deploy@v3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -30,10 +41,10 @@ jobs:
bucket: ${{ secrets.S3_BUCKET }}
delete-removed: true
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
folder: src/.vuepress/dist
folder: dist
private: true

deploy:
deploy-ghp:
needs: upload
runs-on: ubuntu-22.04
permissions:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/reindex.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: '🔍 Reindex search results'

on:
page_build:

workflow_dispatch:
on: deployment

jobs:
trigger:
name: 'Trigger crawl'
runs-on: ubuntu-22.04
steps:
- uses: algolia/[email protected].6
- uses: algolia/[email protected].9
with:
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
Expand Down

0 comments on commit c282eaa

Please sign in to comment.