-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update stackblitz workflow to manually update files (#1365)
This needs to happen in a single commit as opposed to concurrent/parallel workflows because they both check out the main branch first and then force push.
- Loading branch information
1 parent
333dd7a
commit 68ae759
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
name: Publish to Stackblitz | ||
|
||
on: | ||
# Note: the `released` event does not currently work because | ||
# a bot is the creator of the release. Run this manually instead. | ||
release: | ||
types: [released] | ||
workflow_dispatch: | ||
|
@@ -9,20 +11,19 @@ jobs: | |
publish: | ||
runs-on: ubuntu-latest | ||
name: Publish latest release to Stackblitz | ||
strategy: | ||
matrix: | ||
template: ['template-hydrogen-default', 'template-hydrogen-hello-world'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: 'v1.x-2022-07' | ||
- run: | | ||
mv templates/${{ matrix.template }}/_gitignore templates/${{ matrix.template }}/.gitignore | ||
mv templates/template-hydrogen-default/_gitignore templates/template-hydrogen-default/.gitignore | ||
mv templates/template-hydrogen-hello-world/_gitignore templates/template-hydrogen-hello-world/.gitignore | ||
- run: | | ||
sed -i.bak 's/cross-env LOCAL_DEV=true //' templates/${{ matrix.template }}/package.json | ||
sed -i.bak 's/cross-env LOCAL_DEV=true //' templates/template-hydrogen-default/package.json | ||
sed -i.bak 's/cross-env LOCAL_DEV=true //' templates/template-hydrogen-hello-world/package.json | ||
- run: | | ||
git show-ref | ||
git config user.email "[email protected]" | ||
git config user.name "Hydrogen Bot" | ||
git commit -am "Update ${{ matrix.template }} on Stackblitz branch" | ||
git commit -am "Update templates on Stackblitz branch" | ||
git push origin HEAD:stackblitz --force |