Skip to content

Commit f08b984

Browse files
Update GitHub Actions workflow for website publishing (#1129)
## Description Alternate way of using GitHub secrets ### Why Previous one us failing with <img width="823" height="133" alt="image" src="https://github.com/user-attachments/assets/d376c65c-d3aa-4924-8d83-9e7f12e3ea1b" /> ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1129)
1 parent 7d628b1 commit f08b984

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/website-publish.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: RNW Website Publish
23

34
on:
@@ -13,21 +14,31 @@ jobs:
1314
publish_website:
1415
name: Website Publish
1516
runs-on: ubuntu-latest
17+
1618
steps:
1719
- name: Git Setup
1820
run: |
1921
git config --global user.email "53619745+rnbot@users.noreply.github.com"
2022
git config --global user.name "React-Native-Windows Bot"
21-
echo "machine github.com login 53619745+rnbot password ${{ secrets.RNBOT_GH_TOKEN }}" > ~/.netrc
22-
- name: Git Checkout
23-
uses: actions/checkout@v2
23+
echo "machine github.com login x-access-token password ${RNBOT_GH_TOKEN}" > ~/.netrc
24+
env:
25+
RNBOT_GH_TOKEN: ${{ secrets.RNBOT_GH_TOKEN }}
26+
27+
- name: Checkout Repo
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0 # required for gh-pages push
31+
2432
- name: Yarn Install (Website)
2533
run: yarn install --frozen-lockfile
2634
working-directory: ./website
35+
2736
- name: Publish to GitHub Pages
2837
env:
29-
GIT_USER: 53619745+rnbot
38+
GIT_USER: x-access-token
39+
GIT_PASS: ${{ secrets.RNBOT_GH_TOKEN }}
3040
run: yarn run publish-gh-pages
3141
working-directory: ./website
32-
- name: Git Cleanup
42+
43+
- name: Cleanup Netrc
3344
run: rm ~/.netrc

0 commit comments

Comments
 (0)