Skip to content

Update demo.webp

Update demo.webp #398

Workflow file for this run

name: Build and deploy lynkos.dev
on:
push:
branches:
- main
- master
paths-ignore:
- .gitignore
- README.md
- LICENSE.md
- .github/dependabot.yml
workflow_dispatch: # allows manual execution of workflow
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v6
- name: Setup Node
id: setup-node
uses: actions/setup-node@v6
with:
node-version: 'latest'
cache: 'npm'
check-latest: true
- name: Cache dependencies
id: cache
uses: actions/cache@v5
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
id: install
run: npm install
- name: Build
id: build
run: npm run build
- name: Generate sitemap.xml
id: sitemap
run: |
echo '<?xml version="1.0" encoding="UTF-8"?>' > sitemap.xml
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' >> sitemap.xml
echo ' <url>' >> sitemap.xml
echo ' <loc>https://lynkos.dev/</loc>' >> sitemap.xml
echo -n ' <lastmod>' >> sitemap.xml
echo -n $(date '+%F') >> sitemap.xml
echo '</lastmod>' >> sitemap.xml
echo ' <changefreq>daily</changefreq>' >> sitemap.xml
echo ' <priority>1.00</priority>' >> sitemap.xml
echo ' </url>' >> sitemap.xml
echo -n '</urlset>' >> sitemap.xml
- name: Generate robots.txt
id: robots
run: |
echo 'User-agent: *' > robots.txt
echo 'Allow: /' >> robots.txt
echo '' >> robots.txt
echo 'User-agent: AdsBot-Google' >> robots.txt
echo 'Disallow: /' >> robots.txt
echo '' >> robots.txt
echo 'User-agent: AdsBot-Google-Mobile' >> robots.txt
echo 'Disallow: /' >> robots.txt
echo '' >> robots.txt
echo 'User-agent: Mediapartners-Google' >> robots.txt
echo 'Disallow: /' >> robots.txt
echo '' >> robots.txt
echo 'User-agent: Google-Extended' >> robots.txt
echo 'Disallow: /' >> robots.txt
echo '' >> robots.txt
echo 'User-agent: Google-CloudVertexBot' >> robots.txt
echo 'Disallow: /' >> robots.txt
echo '' >> robots.txt
echo -n 'Sitemap: https://lynkos.dev/sitemap.xml' >> robots.txt
- name: Deploy
id: deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # commit hash of v4.0.0
if: github.ref == 'refs/heads/main'
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: prod
# TODO: Remove 'assets/img/apps/mail.webp,dist/components/email.js' from exclude_assets once "Mail" app is fixed
exclude_assets: '.github,.gitignore,README.md,LICENSE.md,node_modules,src,package.json,package-lock.json,assets/img/misc/pipeline.webp,assets/stylesheets/sass,assets/stylesheets/css/components,assets/img/apps/mail.webp,dist/components/email.js'
publish_dir: .
cname: lynkos.dev
disable_nojekyll: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'