feat: update march 7th hunt weights / metadata (#1460) #738
This file contains hidden or 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: drearyquibbles | |
| on: | |
| push: | |
| branches: [beta] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Find and Replace homepage | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "\"homepage\": \"https://fribbels.github.io/hsr-optimizer\"" | |
| replace: "\"homepage\": \"https://fribbels.github.io/dreary-quibbles\"" | |
| include: 'package.json' | |
| - name: Add in-Context script tags | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: '<!--CROWDIN_IN-CONTEXT_SCRIPT-->' | |
| replace: "<script type=\"text/javascript\">var _jipt = [];_jipt.push([ 'project', 'hsr-optimizer' ]);_jipt.push(['start_type', 'manual']);</script><script type=\"text/javascript\" src=\"//cdn.crowdin.com/jipt/jipt.js\"></script>" | |
| include: 'index.html' | |
| - name: Find and Replace vite page | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: "base: '/hsr-optimizer'" | |
| replace: "base: '/dreary-quibbles'" | |
| include: 'vite.config.ts' | |
| - name: Find and Replace router path | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: 'const BASE_PATH: BasePath = BasePath.MAIN' | |
| replace: 'const BASE_PATH: BasePath = BasePath.BETA' | |
| include: 'src/lib/state/db.ts' | |
| - name: Find and Replace Beta header | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: 'Fribbels Honkai Star Rail Optimizer' | |
| replace: 'Fribbels Honkai Star Rail Optimizer (Beta)' | |
| include: 'src/lib/layout/LayoutHeader.tsx' | |
| - name: Enable console.* | |
| uses: jacobtomlinson/gha-find-replace@v3 | |
| with: | |
| find: 'drop_console: true,' | |
| replace: 'drop_console: false,' | |
| include: 'vite.config.ts' | |
| - run: rm -rf .github/workflows | |
| - run: mv .github/drearyquibbles .github/workflows | |
| - name: Push to target repository | |
| run: | | |
| # Setup SSH key | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.SSH_DEPLOY_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # Configure git | |
| git config --global user.name "fribbels" | |
| git config --global user.email "fribbelsgithub@gmail.com" | |
| # Clone target repository | |
| git clone git@github.com:fribbels/dreary-quibbles.git target-repo | |
| # Remove all files except .git directory | |
| find target-repo -mindepth 1 -not -path 'target-repo/.git*' -delete | |
| # Copy all files from current directory except .git and target-repo | |
| rsync -av --exclude='.git' --exclude='target-repo' ./ target-repo/ | |
| # Commit and push changes | |
| cd target-repo | |
| git add . | |
| if git commit -m "Update from ${{ github.repository }}@${{ github.sha }}"; then | |
| git push origin main | |
| else | |
| echo "No changes to commit" | |
| fi |