Skip to content

Commit

Permalink
build(gha): update myparcelnl actions to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jan 24, 2023
1 parent 70e105f commit 797d498
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: 'Download translations and build the site'
runs:
using: composite
steps:
- uses: myparcelnl/actions/yarn2-install@v2
- uses: myparcelnl/actions/yarn2-install@v3

- shell: bash
- name: 'Import latest translations'
shell: bash
run: yarn translations:import

- name: 'Handle build cache'
Expand All @@ -20,5 +21,5 @@ runs:
${{ runner.os }}-build
- shell: bash
run: yarn build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
43 changes: 0 additions & 43 deletions .github/workflows/deploy.yml

This file was deleted.

10 changes: 8 additions & 2 deletions .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: myparcelnl/actions/setup-app-credentials@v3
id: credentials
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}

- uses: aslafy-z/conventional-pr-title-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
47 changes: 43 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,60 @@
name: '♻️ Rebase pull requests'
name: 'Push to main 🚀'

on:
push:
branches:
- main

workflow_dispatch:

jobs:
deploy:
name: 'Deploy to GHP and AWS'
runs-on: ubuntu-22.04
steps:

- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.pull_request.head.ref }}

- uses: myparcelnl/actions/setup-app-credentials@v3
id: credentials
with:
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}

- uses: ./.github/actions/build

- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: src/.vuepress/dist
token: ${{ steps.credentials.outputs.token }}

- uses: reggionick/s3-deploy@v3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
bucket-region: ${{ secrets.AWS_DEFAULT_REGION }}
bucket: ${{ secrets.S3_BUCKET }}
delete-removed: true
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
folder: src/.vuepress/dist
private: true

rebase-prs:
name: 'Rebase open pull requests'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: myparcelnl/actions/setup-git-credentials@main
- uses: myparcelnl/actions/setup-app-credentials@v3
id: credentials
with:
token: ${{ secrets.GH_REPO_TOKEN }}
app-id: ${{ secrets.MYPARCEL_APP_ID }}
private-key: ${{ secrets.MYPARCEL_APP_PRIVATE_KEY }}

- uses: peter-evans/rebase@v2
with:
token: ${{ secrets.GH_REPO_TOKEN }}
token: ${{ steps.credentials.outputs.token }}
18 changes: 18 additions & 0 deletions .idea/jsonSchemas.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 797d498

Please sign in to comment.