DMCA Content #1090
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-docusaurus | |
on: | |
push: | |
branches: [main] | |
jobs: | |
copyfiles: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Copy i18n files | |
run: | | |
rsync -r --ignore-existing docs/ i18n/it/docusaurus-plugin-content-docs/current | |
rsync -r --ignore-existing docs/ i18n/de/docusaurus-plugin-content-docs/current | |
rsync -r --ignore-existing docs/ i18n/fr/docusaurus-plugin-content-docs/current | |
rsync -r --ignore-existing docs/ i18n/es/docusaurus-plugin-content-docs/current | |
rsync -r --ignore-existing docs/ i18n/pt/docusaurus-plugin-content-docs/current | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
if ! git diff-index --quiet HEAD; then | |
git commit -m "Copy files into i18n folder" -a | |
fi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Check out repo | |
uses: actions/checkout@v2 | |
# Node is required for npm | |
- name: Set up Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
# Install and build Docusaurus website | |
- name: Build Docusaurus website | |
run: | | |
npm install --legacy-peer-deps | |
npm run build | |
- name: Deploy to gh-pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: ./build/ | |
#- name: Install SSH Key | |
# uses: shimataro/ssh-key-action@v2 | |
# with: | |
# key: ${{ secrets.SSH_PRIVATE_KEY }} | |
# known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
#- name: Deploy with rsync | |
# run: rsync -avz -e "ssh -p ${{ secrets.SSH_PORT }}" ./build/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/home/odysee/odyseedocs/ |