Skip to content

Commit

Permalink
Fix deploy_preview configuration (primer#699)
Browse files Browse the repository at this point in the history
* updates deploy_preview configuration

* ci: update deploy preview to use actions/upload-pages-artifact

---------

Co-authored-by: Josh Black <[email protected]>
  • Loading branch information
mperrotti and joshblack authored Dec 19, 2023
1 parent 3c6bb4b commit f671d12
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Deploy
name: Deploy Preview

on:
pull_request:

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
Expand All @@ -23,7 +22,7 @@ jobs:
installation-id: ${{ vars.DOTCOM_SHARED_COMPONENTS_APP_INSTALLATION_ID }}

- name: Checkout default branch
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
Expand All @@ -46,14 +45,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.get-dotcom-access-token.outputs.access-token }}

- name: Archive build output
run: "tar --dereference --directory public -cvf artifact.tar ."

- name: Upload artifact
uses: actions/upload-artifact@main
uses: actions/upload-pages-artifact@v2
with:
name: github-pages
path: artifact.tar
path: public

deploy-preview:
if: ${{ github.repository == 'primer/design' }}
Expand Down

0 comments on commit f671d12

Please sign in to comment.