Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-helldar committed Dec 1, 2023
2 parents 2f43b3d + fc18e8d commit f3328ca
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ env:
CONFIG_JSON_PRODUCT: LARAVEL-LANG
CONFIG_JSON_VERSION: 5.x
INSTANCE: docs/laravel-lang
DOMAIN_NAME: laravel-lang.com
BUILDER_VERSION: 232.10275

jobs:
Expand Down Expand Up @@ -140,6 +141,27 @@ jobs:
name: sitemap
path: sitemap.xml
retention-days: 7

robots:
needs: build
name: Generate robots.txt
runs-on: ubuntu-latest

steps:
- name: Create robots.txt
run: |
touch robots.txt
echo "User-Agent: *" >> robots.txt
echo "Disallow: " >> robots.txt
echo "Host: https://${{ env.DOMAIN_NAME }}" >> robots.txt
echo "Sitemap: https://${{ env.DOMAIN_NAME }}/sitemap.xml" >> robots.txt
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: robots
path: robots.txt
retention-days: 7

deploy-pages:
environment:
Expand All @@ -149,6 +171,7 @@ jobs:
needs:
- test
- sitemap
- robots

name: Deploy to Pages
runs-on: ubuntu-latest
Expand All @@ -164,21 +187,20 @@ jobs:
with:
name: sitemap

- name: Download robots artifact
uses: actions/download-artifact@v3
with:
name: robots

- name: Unzip artifact
uses: montudor/action-zip@v1
with:
args: unzip -qq ${{ env.ARTIFACT }} -d dir

- name: Move sitemap
run: sudo mv sitemap.xml dir/sitemap.xml

- name: Create robots.txt
- name: Move sitemap and robots
run: |
touch dir/robots.txt
echo "User-Agent: *" >> dir/robots.txt
echo "Disallow: " >> dir/robots.txt
echo "Host: https://laravel-lang.com" >> dir/robots.txt
echo "Sitemap: https://laravel-lang.com/sitemap.xml" >> dir/robots.txt
sudo mv sitemap.xml dir/sitemap.xml
sudo mv robots.txt dir/robots.txt
- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down

0 comments on commit f3328ca

Please sign in to comment.