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: Archive pack
# if: ${{ github.event_name != 'release' }}
- name: Attach pack to release assets # uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'release' }} # with:
uses: svenstaro/upload-release-action@v2 # path: output/*.pack
with: # retention-days: 1
repo_token: ${{ secrets.GITHUB_TOKEN }} # if-no-files-found: error
file_glob: true #
file: output/*.pack # - name: Attach pack to release assets
tag: ${{ github.ref }} # if: ${{ github.event_name == 'release' }}
overwrite: true # uses: svenstaro/upload-release-action@v2
# with:
- uses: actions/checkout@v2 # repo_token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # file_glob: true
with: # file: output/*.pack
ref: gh-pages # tag: ${{ github.ref }}
# overwrite: true
- name: Publish documentation #
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} # - uses: actions/checkout@v2
run: | # if: ${{ github.event_name == 'release' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
rm -rf main # with:
mkdir main # ref: gh-pages
cd main #
tar -xvjf /tmp/doc.tbz2 # - name: Publish documentation
git config user.name github-actions # if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
git config user.email github-actions@github.com # run: |
git add . # rm -rf main
git commit -m "Update main documentation" # mkdir main
git push # cd main
# tar -xvjf /tmp/doc.tbz2
- name: Publish documentation # git config user.name github-actions
if: ${{ github.event_name == 'release' }} # git config user.email github-actions@github.com
run: | # git add .
RELEASE=$(echo $GITHUB_REF | sed 's/refs\/tags\///') # git commit -m "Update main documentation"
rm -rf ${RELEASE} # git push
mkdir -p ${RELEASE} #
rm -f latest # - name: Publish documentation
ln -s ${RELEASE} latest # if: ${{ github.event_name == 'release' }}
cd ${RELEASE} # run: |
tar -xvjf /tmp/doc.tbz2 # RELEASE=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
git config user.name github-actions # rm -rf ${RELEASE}
git config user.email github-actions@github.com # mkdir -p ${RELEASE}
git add . ../latest # rm -f latest
git commit -m "Update documentation for release ${RELEASE}" # ln -s ${RELEASE} latest
git push # 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