Skip to content

Commit 7f937be

Browse files
authored
Create replace-strings.yml
1 parent 24afc02 commit 7f937be

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Replace strings in HTML files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
replace:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Install dependencies
17+
run: sudo apt-get install sed
18+
19+
- name: Replace strings in HTML files
20+
run: |
21+
find . -type f -name "*.html" -exec sed -i 's|https://closure-next.github.io|/|g' {} \;
22+
find . -type f -name "*.html" -exec sed -i 's|assets|/assets|g' {} \;
23+
24+
- name: Commit changes
25+
run: |
26+
git config --local user.name "github-actions"
27+
git config --local user.email "github-actions@github.com"
28+
git add .
29+
git commit -m "Replace URLs in HTML files"
30+
git push

0 commit comments

Comments
 (0)