Skip to content

Commit a40f393

Browse files
authored
Merge pull request #885 from DuendeSoftware/pg/explicit
Be explicit about which event we are invoking
2 parents f110a00 + cc2ebca commit a40f393

2 files changed

Lines changed: 5 additions & 49 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Azure Static Web Apps CI/CD
1+
name: ci
22

33
on:
44
push:
@@ -10,56 +10,12 @@ on:
1010
- main
1111

1212
jobs:
13-
build_and_deploy_job:
14-
env:
15-
AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
13+
build:
1614
runs-on: ubuntu-latest
17-
permissions:
18-
contents: read
19-
pull-requests: write
20-
name: Build and Deploy Job
2115
steps:
2216
- uses: actions/checkout@v2
2317
with:
2418
submodules: true
25-
- name: Setup Node
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: 22
29-
- name: Run build
19+
- name: build
3020
run: |
31-
echo $PWD
32-
./build.sh
33-
- name: Build And Deploy
34-
if: (github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')) && env.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F != ''
35-
id: builddeploy
36-
uses: Azure/static-web-apps-deploy@v1
37-
with:
38-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
39-
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
40-
action: "upload"
41-
###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
42-
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
43-
app_location: "/root" # App source code path
44-
api_location: "api" # Api source code path - optional
45-
app_artifact_location: "" # Built app content directory - optional
46-
###### End of Repository/Build Configurations ######
47-
48-
close_pull_request_job:
49-
env:
50-
AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
51-
runs-on: ubuntu-latest
52-
permissions:
53-
contents: read
54-
pull-requests: write
55-
issues: write
56-
name: Close Pull Request Job
57-
steps:
58-
- name: Close Pull Request
59-
if: (github.event_name == 'pull_request' && github.event.action == 'closed') && env.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F != ''
60-
id: closepullrequest
61-
uses: Azure/static-web-apps-deploy@v1
62-
with:
63-
app_location: "/root" # App source code path
64-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_OCEAN_048B8E60F }}
65-
action: "close"
21+
docker build .

.github/workflows/docs-ci-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
await github.rest.repos.createDispatchEvent({
3333
owner: '${{ github.repository_owner }}',
3434
repo: '${{ secrets.OPS_REPOSITORY_NAME }}',
35-
event_type: 'trigger-workflow',
35+
event_type: 'deploy-docs',
3636
client_payload: {
3737
"source_repo": "${{ github.repository }}",
3838
"ref": "${{ github.ref }}",

0 commit comments

Comments
 (0)