1- name : PR Preview
1+ # name: PR Preview
22
3- on :
4- pull_request :
5- types : [opened, synchronize, reopened]
3+ # on:
4+ # pull_request:
5+ # types: [opened, synchronize, reopened]
66
7- jobs :
8- build-preview :
9- runs-on : ubuntu-latest
10- permissions :
11- contents : write
12- pull-requests : write
13- steps :
14- - uses : actions/checkout@v3
7+ # jobs:
8+ # build-preview:
9+ # runs-on: ubuntu-latest
10+ # permissions:
11+ # contents: write
12+ # pull-requests: write
13+ # steps:
14+ # - uses: actions/checkout@v3
1515
16- - name : Setup Hugo
17- uses : peaceiris/actions-hugo@v2
18- with :
19- hugo-version : ' 0.133.1'
20- extended : true
16+ # - name: Setup Hugo
17+ # uses: peaceiris/actions-hugo@v2
18+ # with:
19+ # hugo-version: '0.133.1'
20+ # extended: true
2121
22- - name : Copy the missing files from /content/en for publishing each language site
23- run : |
24- for i in fr ja pt-br; do
25- rsync -rv --ignore-existing content/en/ content/$i/ --log-file=content/.gitignore;
26- sed -i "s/^.\{37\} /$i\//g" content/.gitignore;
27- sed -i '/total size\|file list/d' content/.gitignore;
28- done
22+ # - name: Copy the missing files from /content/en for publishing each language site
23+ # run: |
24+ # for i in fr ja pt-br; do
25+ # rsync -rv --ignore-existing content/en/ content/$i/ --log-file=content/.gitignore;
26+ # sed -i "s/^.\{37\} /$i\//g" content/.gitignore;
27+ # sed -i '/total size\|file list/d' content/.gitignore;
28+ # done
2929
30- - name : Build
31- run : hugo --minify
30+ # - name: Build
31+ # run: hugo --minify
3232
33- - name : Setup GitHub Pages
34- id : pages
35- uses : actions/configure-pages@v3
33+ # - name: Setup GitHub Pages
34+ # id: pages
35+ # uses: actions/configure-pages@v3
3636
37- - name : Deploy Preview to GitHub Pages Branch
38- run : |
39- PR_NUMBER=${{ github.event.pull_request.number }}
40- PREVIEW_DIR="pr-preview/pr-$PR_NUMBER"
37+ # - name: Deploy Preview to GitHub Pages Branch
38+ # run: |
39+ # PR_NUMBER=${{ github.event.pull_request.number }}
40+ # PREVIEW_DIR="pr-preview/pr-$PR_NUMBER"
4141
42- git config --global user.name "github-actions[bot]"
43- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
42+ # git config --global user.name "github-actions[bot]"
43+ # git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
4444
45- git clone --quiet --branch=gh-pages --depth=1 https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git gh-pages
45+ # git clone --quiet --branch=gh-pages --depth=1 https://${GITHUB_TOKEN}@github.com/${{ github.repository }}.git gh-pages
4646
47- mkdir -p gh-pages/${PREVIEW_DIR}
48- rm -rf gh-pages/${PREVIEW_DIR}/*
49- cp -r public/* gh-pages/${PREVIEW_DIR}/
47+ # mkdir -p gh-pages/${PREVIEW_DIR}
48+ # rm -rf gh-pages/${PREVIEW_DIR}/*
49+ # cp -r public/* gh-pages/${PREVIEW_DIR}/
5050
51- cd gh-pages
52- git add .
53- git commit -m "Update preview for PR #$PR_NUMBER" || echo "No changes to commit"
54- git push origin gh-pages
55- env :
56- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51+ # cd gh-pages
52+ # git add .
53+ # git commit -m "Update preview for PR #$PR_NUMBER" || echo "No changes to commit"
54+ # git push origin gh-pages
55+ # env:
56+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
58- - name : Add or Update PR Comment
59- run : |
60- PR_NUMBER=${{ github.event.pull_request.number }}
61- PREVIEW_URL="${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-$PR_NUMBER/"
58+ # - name: Add or Update PR Comment
59+ # run: |
60+ # PR_NUMBER=${{ github.event.pull_request.number }}
61+ # PREVIEW_URL="${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-$PR_NUMBER/"
6262
63- # Check if comment already exists
64- COMMENT_ID=$(gh pr view $PR_NUMBER --json comments --jq '.comments[] | select(.author.login == "github-actions[bot]" and contains(.body, "Preview this PR")) | .id')
63+ # # Check if comment already exists
64+ # COMMENT_ID=$(gh pr view $PR_NUMBER --json comments --jq '.comments[] | select(.author.login == "github-actions[bot]" and contains(.body, "Preview this PR")) | .id')
6565
66- if [ -z "$COMMENT_ID" ]; then
67- # Create new comment
68- gh pr comment $PR_NUMBER --body "### :rocket: Preview this PR
66+ # if [ -z "$COMMENT_ID" ]; then
67+ # # Create new comment
68+ # gh pr comment $PR_NUMBER --body "### :rocket: Preview this PR
6969
70- You can view a preview of the website changes at:
71- https://${PREVIEW_URL}
70+ # You can view a preview of the website changes at:
71+ # https://${PREVIEW_URL}
7272
73- This preview will be updated automatically as you make changes to the PR.
73+ # This preview will be updated automatically as you make changes to the PR.
7474
75- ### :computer: Review in GitHub Codespaces
75+ # ### :computer: Review in GitHub Codespaces
7676
77- You can also review these changes directly in GitHub Codespaces:
77+ # You can also review these changes directly in GitHub Codespaces:
7878
79- 1. Click the 'Code' button above and select the 'Codespaces' tab
80- 2. Create a codespace on this PR's branch
81- 3. Once loaded, press F5 or use the Run and Debug panel to start the Hugo server
82- 4. Make changes and see them update in real-time
79+ # 1. Click the 'Code' button above and select the 'Codespaces' tab
80+ # 2. Create a codespace on this PR's branch
81+ # 3. Once loaded, press F5 or use the Run and Debug panel to start the Hugo server
82+ # 4. Make changes and see them update in real-time
8383
84- For detailed instructions, refer to the [Codespaces documentation](../blob/main/CODESPACES.md).
84+ # For detailed instructions, refer to the [Codespaces documentation](../blob/main/CODESPACES.md).
8585
86- _Note: The preview may take a few moments to deploy after changes are pushed._"
87- else
88- # Update existing comment
89- gh pr comment $PR_NUMBER --edit-comment $COMMENT_ID --body "### :rocket: Preview this PR
86+ # _Note: The preview may take a few moments to deploy after changes are pushed._"
87+ # else
88+ # # Update existing comment
89+ # gh pr comment $PR_NUMBER --edit-comment $COMMENT_ID --body "### :rocket: Preview this PR
9090
91- You can view a preview of the website changes at:
92- https://${PREVIEW_URL}
91+ # You can view a preview of the website changes at:
92+ # https://${PREVIEW_URL}
9393
94- This preview will be updated automatically as you make changes to the PR.
94+ # This preview will be updated automatically as you make changes to the PR.
9595
96- ### :computer: Review in GitHub Codespaces
96+ # ### :computer: Review in GitHub Codespaces
9797
98- You can also review these changes directly in GitHub Codespaces:
98+ # You can also review these changes directly in GitHub Codespaces:
9999
100- 1. Click the 'Code' button above and select the 'Codespaces' tab
101- 2. Create a codespace on this PR's branch
102- 3. Once loaded, press F5 or use the Run and Debug panel to start the Hugo server
103- 4. Make changes and see them update in real-time
100+ # 1. Click the 'Code' button above and select the 'Codespaces' tab
101+ # 2. Create a codespace on this PR's branch
102+ # 3. Once loaded, press F5 or use the Run and Debug panel to start the Hugo server
103+ # 4. Make changes and see them update in real-time
104104
105- For detailed instructions, refer to the [Codespaces documentation](../blob/main/CODESPACES.md).
105+ # For detailed instructions, refer to the [Codespaces documentation](../blob/main/CODESPACES.md).
106106
107- _Note: The preview may take a few moments to deploy after changes are pushed._"
108- fi
109- env :
110- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107+ # _Note: The preview may take a few moments to deploy after changes are pushed._"
108+ # fi
109+ # env:
110+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
0 commit comments