generated from deco-sites/fashion
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Add deco-deploy github action"" (#49)
* Revert "Revert "Add deco-deploy github action (#47)" (#48)" This reverts commit b4c4c64. * Fix site matrix Signed-off-by: Marcos Candeia <[email protected]> * Fix fromJson Signed-off-by: Marcos Candeia <[email protected]> * Fix matrix Signed-off-by: Marcos Candeia <[email protected]> * Fix condition check to run Signed-off-by: Marcos Candeia <[email protected]> * Add retry and concurrency Signed-off-by: Marcos Candeia <[email protected]> * Remove continue on error Signed-off-by: Marcos Candeia <[email protected]> * Change to decodeployretrystep Signed-off-by: Marcos Candeia <[email protected]> --------- Signed-off-by: Marcos Candeia <[email protected]>
- Loading branch information
Showing
2 changed files
with
55 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy | ||
|
||
concurrency: | ||
group: environment-${{ github.head_ref || github.ref }} | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
set_vars: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
site_matrix: ${{ steps.set_vars.outputs.site_matrix }} | ||
steps: | ||
- name: Set site matrix | ||
id: set_vars | ||
shell: bash | ||
run: | | ||
if [ -z ${{ vars.SITES }} ]; then | ||
echo "site_matrix={site: [\"${{ github.event.repository.name }}\"] }" >> $GITHUB_OUTPUT | ||
else | ||
echo "site_matrix={site: ${{ vars.SITES }} }" >> $GITHUB_OUTPUT | ||
fi | ||
deploy: | ||
needs: set_vars | ||
strategy: | ||
matrix: ${{ fromJson(needs.set_vars.outputs.site_matrix) }} | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write # Needed for auth with Deno Deploy | ||
contents: read # Needed to clone the repository | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deco Deploy | ||
id: decoDeployStep | ||
continue-on-error: true | ||
uses: deco-cx/deploy@v0 | ||
with: | ||
site: ${{ matrix.site }} | ||
|
||
- name: Retry Deco Deploy | ||
id: decoDeployRetryStep | ||
if: steps.decoDeployStep.outcome == 'failure' | ||
uses: deco-cx/deploy@v0 | ||
with: | ||
site: ${{ matrix.site }} |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"$store/": "./", | ||
"deco/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"apps/": "https://denopkg.com/deco-cx/[email protected]/", | ||
"$fresh/": "https://denopkg.com/deco-cx/fresh@1.4.4/", | ||
"$fresh/": "https://deno.land/x/fresh@1.5.2/", | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"preact-render-to-string": "https://esm.sh/*[email protected]", | ||
|