Bump @michijs/dev-server from 0.7.25 to 0.7.26 (#8) #147
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: Update docs | |
on: | |
push: | |
branches: ["master"] | |
repository_dispatch: | |
types: [push] | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up environment | |
uses: michijs/.github/.github/actions/setup@main | |
- name: Install dependencies | |
uses: michijs/.github/.github/actions/install@main | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Git configuration | |
uses: michijs/.github/.github/actions/set-git-config-github-actions@main | |
- name: Fetch npm Versions | |
id: fetch_versions | |
run: | | |
VERSIONS=$(bunx npm show @michijs/michijs versions --json) | |
FILTERED_VERSIONS=$(echo "$VERSIONS" | jq -r 'map(select(. | test("beta|rc") | not)) | join(" ")') | |
echo "VERSIONS=$FILTERED_VERSIONS" >> $GITHUB_ENV | |
- name: Retrieve READMEs | |
id: fetch_readmes | |
run: | | |
for version in $VERSIONS; do | |
if [[ $version == $(echo "$VERSIONS" | awk '{print $NF}') ]]; then | |
wget -O jekyll-src/README.md https://raw.githubusercontent.com/michijs/michijs/v$version/README.md | |
else | |
if [ ! -f "v$version.md" ]; then | |
wget -O jekyll-src/v$version.md https://raw.githubusercontent.com/michijs/michijs/v$version/README.md | |
fi | |
fi | |
done | |
wget -O jekyll-src/Next.md https://raw.githubusercontent.com/michijs/michijs/master/README.md | |
- name: Commit changes | |
uses: michijs/.github/.github/actions/commit-if-changes@main | |
with: | |
message: "Readme update" | |
- name: Push changes | |
uses: michijs/.github/.github/actions/pull-and-push@main | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
uses: michijs/.github/.github/actions/run@main | |
with: | |
command: build | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Setup Ruby | |
uses: ruby/[email protected] | |
with: | |
ruby-version: '3.1' # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
cache-version: 0 # Increment this number if you need to re-download cached gems | |
- name: Build with Jekyll | |
run: | | |
bundle exec jekyll build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |