Skip to content

Commit

Permalink
Fix publish docs workflow (#2223)
Browse files Browse the repository at this point in the history
  • Loading branch information
smiasojed authored Apr 26, 2024
1 parent 330fe1e commit 370a495
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,33 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 100
token: ${{ secrets.GH_PAGES }}

- name: Download Contract Sizes
- name: Download Docs
uses: ./.github/download-artifact
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARTIFACT_NAME: docs-data
DOWNLOAD_DIR: crate-docs

- name: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Push docs
run: |
# Set git config
git config user.email "paritytech-ci@parity.io"
git config user.name "paritytech-ci"
git config user.email "actions@github.com"
git config user.name "actions"
git fetch origin gh-pages
# saving README and docs
cp -r ./crate-docs/ /tmp/doc/
Expand Down

0 comments on commit 370a495

Please sign in to comment.