Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo committed Jan 22, 2024
1 parent 3193c2c commit 88135a1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,37 @@ on:
# only for the default branch.
push:
branches:
main
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
fetch:
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: v0.4.36
MDBOOKTOC_VERSION: 0.14.2
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Rust packages
uses: actions/checkout@v4
- name: Install mdbook and mdbook--toc
run: |
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh | bash -s -- --repo "rust-lang/mdBook" --bin mdbook --to ~/.cargo/bin
curl --proto '=https' --tlsv1.2 -sSf https://rossmacarthur.github.io/install/crate.sh | bash -s -- --repo "badboy/mdbook-toc" --to ~/.cargo/bin
mkdir installed-bins
curl -Lf "https://github.com/rust-lang/mdBook/releases/download/$MDBOOK_VERSION/mdbook-$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar -xz --directory=./installed-bins
curl -Lf "https://github.com/badboy/mdbook-toc/releases/download/$MDBOOKTOC_VERSION/mdbook-toc-$MDBOOKTOC_VERSION-x86_64-unknown-linux-gnu.tar.gz" | tar -xz --directory=./installed-bins
echo `pwd`/installed-bins >> $GITHUB_PATH
- name: Install gh-pages
run: |
npm install gh-pages@"~4.0.0"
npm install gh-pages@"~6.1.1"
- name: Build book
run: |
mdbook --version
mdbook-toc --version
mdbook build
- name: Set Git config
run: |
git config --global user.email 'flodolo@users.noreply.github.com'
git config --global user.name 'Francesco Lodolo [:flod]'
git config --global user.email "actions@users.noreply.github.com"
git config --global user.name 'Automation'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Deploy to GitHub pages
run: |
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
# Triggers the workflow on push or pull request events but
# only for the default branch
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -16,17 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v4
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run markdown linter
run: |
npm install
npm test
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Check SUMMARY.md
run: |
python .github/scripts/check_summary.py src
1 change: 1 addition & 0 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ renderer = ["html"]
[output.html]
git-repository-url = "https://github.com/mozilla-l10n/documentation/"
edit-url-template = "https://github.com/mozilla-l10n/documentation/edit/main/{path}"
no-section-label = true

0 comments on commit 88135a1

Please sign in to comment.