Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterCalvin committed Feb 16, 2025
1 parent 8a4d5e6 commit 0b1cee1
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Generate mkdocs.yml
run: |
# Get current year
YEAR=$(date +'%Y')
# Process the entire mkdocs.yml file
cat mkdocs.yml | \
sed "s/{{ username }}/${{ github.repository_owner }}/g" | \
sed "s/{{ repo_name }}/${{ github.event.repository.name }}/g" | \
sed "s/{{ year }}/${YEAR}/g" \
> mkdocs.generated.yml
mv mkdocs.generated.yml mkdocs.yml
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Expand All @@ -23,15 +36,6 @@ jobs:
with:
python-version: 3.x

- name: Create replacements.yml
run: |
echo "meta:" > replacements.yml
echo " username: ${{ github.repository_owner }}" >> replacements.yml
echo " repo_name: ${{ github.event.repository.name }}" >> replacements.yml
echo " year: $(date +'%Y')" >> replacements.yml
echo " full_repo: ${{ github.repository }}" >> replacements.yml
cat replacements.yml
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- uses: actions/cache@v4
Expand Down

0 comments on commit 0b1cee1

Please sign in to comment.