Skip to content

fix: exclude

fix: exclude #10

Workflow file for this run

name: 'GSIサーバーへのデプロイ'
on:
push:
branches: [ gh-pages ]
jobs:
deploy:
permissions:
id-token: write
contents: read
if: github.repository == 'gsimaps-cicd/gsimaps-internal'
runs-on: ubuntu-latest
env:
DEPLOY_ROLE_ARN: ${{ secrets.DEPLOY_ROLE_ARN }}
S3_DEPLOY_BUCKET_NAME: ${{ secrets.S3_DEPLOY_BUCKET_NAME }}
steps:
- uses: actions/checkout@v4
with:
ref: gh-pages
- name: HTMLファイルの内容を修正
run: |
# index.htmlの修正
sed -i '6a\ <link rel="apple-touch-icon" href="apple-touch-icon.png" />' index.html
sed -i 's/<title>.*<\/title>/<title>地理院地図 \/ GSI Maps | 国土地理院<\/title>/' index.html
sed -i '/GSI.GLOBALS.isCreditShow = true;/,+2d' index.html
sed -i 's/<div id="title_logo_upper">.*<\/div>/<div id="title_logo_upper">地理院地図<\/div>/' index.html
sed -i 's/<div id="title_logo_lower">.*<\/div>/<div id="title_logo_lower">(電子国土WEB)<\/div>/' index.html
# index_m.html の修正
sed -i 's/<title>.*<\/title>/<title>地理院地図 \/ GSI Maps\|国土地理院<\/title>/' index_m.html
sed -i '/GSI.GLOBALS.isCreditShow = true;/,+2d' index_m.html
sed -i 's/<div class="logoarea"><\/div>/<div class="logoarea"><a style="text-decoration:none;" href=""><img class="logoimage" src="image\/m_logo.jpg"><\/a><\/div>/' index_m.html
# index_3d.html の修正
sed -i 's/<title>.*<\/title>/<title>地理院地図3D<\/title>/' index_3d.html
# globe/index_globe.html の修正
sed -i 's/<title>.*<\/title>/<title>地理院地図Globe<\/title>/' globe/index_globe.html
sed -i 's/<div id="title_logo_upper">.*<\/div>/<div id="title_logo_upper">地理院地図<\/div>/' globe/index_globe.html
sed -i 's/<div id="title_logo_lower">.*<\/div>/<div id="title_logo_lower">Globe<\/div>/' globe/index_globe.html
- name: 特定のファイルを除外
run: |
rm -f image/print/title.png
rm -rf .git .github
rm -f *.md LICENSE* .gitignore
rm -f package.json package-lock.json
rm -f .editorconfig .env .gitattributes
rm -f *.yml *.yaml
- uses: aws-actions/configure-aws-credentials@v4
if: ${{ env.DEPLOY_ROLE_ARN != '' }}
with:
aws-region: ap-northeast-1
role-to-assume: ${{ env.DEPLOY_ROLE_ARN }}
- name: S3バケットにデプロイ
run: |
aws s3 cp . s3://${S3_DEPLOY_BUCKET_NAME}/ --recursive