Skip to content

Commit 57fef31

Browse files
authored
Update main.yml
1 parent 3b6727f commit 57fef31

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write # Autorise le workflow à écrire sur le dépôt
1012
steps:
1113
- uses: actions/checkout@v4
1214

@@ -19,12 +21,14 @@ jobs:
1921
run: |
2022
pip install mkdocs mkdocs-material
2123
22-
- name: Build and deploy
23-
env:
24-
GH_PAT: ${{ secrets.GH_PAT }}
24+
- name: Configure Git credentials
2525
run: |
2626
git config --global user.name "github-actions[bot]"
2727
git config --global user.email "github-actions[bot]@users.noreply.github.com"
28-
remote_url="https://${GH_PAT}@github.com/QualCoder-Org/qualcoder-org.github.io.git"
29-
git remote set-url origin "$remote_url"
28+
29+
- name: Build and deploy
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/QualCoder-Org/qualcoder-org.github.io.git"
3034
mkdocs gh-deploy --force

0 commit comments

Comments
 (0)