Skip to content

Commit f26ce58

Browse files
authored
Merge pull request #13 from woocommerce/qao-31-woocommerce-org-replace-crazy-maxghaction-github-pages-with
Replace crazy-max/ghaction-github-pages with official GitHub Pages actions
2 parents 875281d + 6863f99 commit f26ce58

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,35 @@ on:
33
push:
44
branches:
55
- trunk
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
616
jobs:
717
build-and-deploy:
818
if: github.repository_owner == 'woocommerce'
919
name: Build and deploy
1020
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
1124
steps:
1225
- name: Checkout code
13-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
1427
- name: Build
1528
run: ./build.sh
16-
- name: Deploy to GitHub Pages
17-
if: success()
18-
uses: crazy-max/ghaction-github-pages@59173cb633d9a3514f5f4552a6a3e62c6710355c # v2
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
2133
with:
22-
target_branch: gh-pages
23-
build_dir: build
34+
path: build
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)