Allow ssh after gen_pack

pull/11/head
Jonatan Antoni 4 years ago
parent 8a30e18177
commit 3c392d1a3b

@ -16,6 +16,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 fetch-depth: 0
- name: Install packages - name: Install packages
@ -54,21 +55,21 @@ jobs:
echo "::remove-matcher owner=doxygen::" echo "::remove-matcher owner=doxygen::"
working-directory: ./Doxygen working-directory: ./Doxygen
- name: Run linkchecker # - name: Run linkchecker
run: | # run: |
echo "::add-matcher::.github/linkchecker.json" # echo "::add-matcher::.github/linkchecker.json"
/bin/bash ../Scripts/git/check_links.sh ./html/index.html ./ # /bin/bash ../Scripts/git/check_links.sh ./html/index.html ./
echo "::remove-matcher owner=linkchecker::" # echo "::remove-matcher owner=linkchecker::"
working-directory: ./Documentation # working-directory: ./Documentation
- name: Archive documentation # - name: Archive documentation
if: ${{ github.event_name == 'pull_request' }} # if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
with: # with:
name: documentation # name: documentation
path: Documentation/html/ # path: Documentation/html/
retention-days: 1 # retention-days: 1
if-no-files-found: error # if-no-files-found: error
- name: Archive documentation - name: Archive documentation
if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
@ -82,57 +83,63 @@ jobs:
mkdir -p ~/.arm/Packs/.Web mkdir -p ~/.arm/Packs/.Web
wget -O ~/.arm/Packs/.Web/ARM.CMSIS.pdsc https://www.keil.com/pack/ARM.CMSIS.pdsc wget -O ~/.arm/Packs/.Web/ARM.CMSIS.pdsc https://www.keil.com/pack/ARM.CMSIS.pdsc
echo "::add-matcher::.github/packchk.json" echo "::add-matcher::.github/packchk.json"
/bin/bash ./Scripts/git/gen_pack.sh /bin/bash ./Scripts/git/gen_pack.sh -k
echo "::remove-matcher owner=packchk::" echo "::remove-matcher owner=packchk::"
- name: Archive pack - name: Setup upterm session
if: ${{ github.event_name != 'release' }} uses: lhotari/action-upterm@v1
uses: actions/upload-artifact@v2 # with:
with: ## limits ssh access and adds the ssh public key for the user which triggered the workflow
path: output/*.pack # limit-access-to-actor: true
retention-days: 1
if-no-files-found: error
- name: Attach pack to release assets
if: ${{ github.event_name == 'release' }}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: output/*.pack
tag: ${{ github.ref }}
overwrite: true
- uses: actions/checkout@v2 # - name: Archive pack
if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # if: ${{ github.event_name != 'release' }}
with: # uses: actions/upload-artifact@v2
ref: gh-pages # with:
# path: output/*.pack
- name: Publish documentation # retention-days: 1
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # if-no-files-found: error
run: | #
rm -rf main # - name: Attach pack to release assets
mkdir main # if: ${{ github.event_name == 'release' }}
cd main # uses: svenstaro/upload-release-action@v2
tar -xvjf /tmp/doc.tbz2 # with:
git config user.name github-actions # repo_token: ${{ secrets.GITHUB_TOKEN }}
git config user.email github-actions@github.com # file_glob: true
git add . # file: output/*.pack
git commit -m "Update main documentation" # tag: ${{ github.ref }}
git push # overwrite: true
#
- name: Publish documentation # - uses: actions/checkout@v2
if: ${{ github.event_name == 'release' }} # if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: | # with:
RELEASE=$(echo $GITHUB_REF | sed 's/refs\/tags\///') # ref: gh-pages
rm -rf ${RELEASE} #
mkdir -p ${RELEASE} # - name: Publish documentation
rm -f latest # if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
ln -s ${RELEASE} latest # run: |
cd ${RELEASE} # rm -rf main
tar -xvjf /tmp/doc.tbz2 # mkdir main
git config user.name github-actions # cd main
git config user.email github-actions@github.com # tar -xvjf /tmp/doc.tbz2
git add . ../latest # git config user.name github-actions
git commit -m "Update documentation for release ${RELEASE}" # git config user.email github-actions@github.com
git push # git add .
# git commit -m "Update main documentation"
# git push
#
# - name: Publish documentation
# if: ${{ github.event_name == 'release' }}
# run: |
# RELEASE=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
# rm -rf ${RELEASE}
# mkdir -p ${RELEASE}
# rm -f latest
# ln -s ${RELEASE} latest
# cd ${RELEASE}
# tar -xvjf /tmp/doc.tbz2
# git config user.name github-actions
# git config user.email github-actions@github.com
# git add . ../latest
# git commit -m "Update documentation for release ${RELEASE}"
# git push

Loading…
Cancel
Save