feat: Migrate Percy from CircleCI to Github Actions #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Prepare Percy build" | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
copy_artifact: | |
name: Copy changed files to GHA artifact | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
src/ | |
- name: Populate artifact directory | |
run: | | |
mkdir -p artifact | |
cp -R src/ artifact/. | |
# Archive the PR number associated with this workflow since it won't be available in the base workflow context | |
# https://github.com/orgs/community/discussions/25220 | |
- name: Archive PR data | |
if: github.event_name=='pull_request' | |
working-directory: artifact | |
run: | | |
echo ${{ github.event.number }} > pr_num.txt | |
echo ${{ github.event.pull_request.head.sha }} > pr_head_sha.txt | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "percy-testing-web-artifact" | |
path: artifact/* |