Skip to content

Translate calendar periodically #28

Translate calendar periodically

Translate calendar periodically #28

name: Translate calendar periodically
on:
schedule:
- cron: '0 0 * * mon' # Every monday
workflow_dispatch:
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: dauletbaev/[email protected]
id: translator
with:
calendar_url: ${{ secrets.NEPTUN_CALENDAR_URL }}
google_cloud_project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT_ID }}
google_cloud_api_key: ${{ secrets.GOOGLE_CLOUD_API_KEY }}
target_language: 'en-US'
- name: Upload the output to the server
run: |
# Store the result in a variable
result="${{ steps.translator.outputs.result }}"
# Define the URL of the server where you want to send the POST request
server_url="${{ secrets.SERVER_ENDPOINT }}"
# Send the POST request with curl
response=$(curl -X POST -d "$result" -H "Content-Type: text/plain" "$server_url")
# Print the response from the server
echo "Response from server: $response"